<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="RichTextField,com.riaidea.richtextfield.RichTextField,DYNAMIC,INPUT,autoScroll,autoScrollV,lineHeight,defaultTextFormat,format,length,numSprite,text,textLength,textfield,type,placeholderColor,spriteHspace,spriteVspace,addSprite,appendFromRichText,appendRichText,appendText,clear,copyFromRichText,getSpriteAt,getSpriteByName,getSpriteIndexAt,isSprite,removeSpriteByName,replace,resize,setCaretIndex,setTextFormat,testString" name="keywords">
<title>com.riaidea.richtextfield.RichTextField</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'RichTextField - RichTextField API';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?com/riaidea/richtextfield/RichTextField.html&amp;com/riaidea/richtextfield/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;RichTextField</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class RichTextField"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.riaidea.richtextfield</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class RichTextField</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">RichTextField <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> flash.display.Sprite</td>
</tr>
</table>
<p></p>
<p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#autoScroll">autoScroll</a> : Boolean<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#autoScrollV">autoScrollV</a> : int = 0<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#defaultTextFormat">defaultTextFormat</a> : TextFormat<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#format">format</a> : Dictionary<div class="summaryTableDescription">[read-only]
   应用于RichTextField的所有文本格式集合
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#length">length</a> : int<div class="summaryTableDescription">[read-only]
   textfield的原始长度，包括显示对象
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#lineHeight">lineHeight</a> : Number<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#numSprite">numSprite</a> : int<div class="summaryTableDescription">[read-only]
   RichTextField中存在的所有显示对象数目。
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#placeholderColor">placeholderColor</a> : uint<div class="summaryTableDescription">[write-only]
   RichTextField的特殊字符的颜色，有时候需要设置其颜色和背景色一致来让其“隐身”。
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#spriteHspace">spriteHspace</a> : int<div class="summaryTableDescription">[write-only]
   显示对象的水平间隔
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#spriteVspace">spriteVspace</a> : int<div class="summaryTableDescription">[write-only]
   显示对象的垂直间隔
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#text">text</a> : String<div class="summaryTableDescription">
   textfield中的文本内容，不包括显示对象
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#textfield">textfield</a> : TextField<div class="summaryTableDescription">[read-only]
   instance of textfield
   <br>textfield实例
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#textLength">textLength</a> : int<div class="summaryTableDescription">[read-only]
   textfield中的文本长度，不包括显示对象
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#type">type</a> : String<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#RichTextField()">RichTextField</a>(width:Number, height:Number, type:String)</div>
<div class="summaryTableDescription">
   constructor
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addSprite()">addSprite</a>(target:*, caretIndex:int = -1, width:Number = -1, height:Number = -1):void</div>
<div class="summaryTableDescription">
   add a sprite with a placeholder to the right place
   添加一个显示元素到指定的位置
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#appendFromRichText()">appendFromRichText</a>(source:<a href="RichTextField.html">RichTextField</a>, beginIndex:int = -1, endIndex:int = -1, autoWordWrap:Boolean = true):void</div>
<div class="summaryTableDescription">
   append rich text with sprites in source.</div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#appendRichText()">appendRichText</a>(text:String, object:Array = null, format:TextFormat = null, autoWordWrap:Boolean = true):void</div>
<div class="summaryTableDescription">
   append rich text which contains display objects and text format.</div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#appendText()">appendText</a>(text:String, format:TextFormat = null, autoWordWrap:Boolean = true):void</div>
<div class="summaryTableDescription">
   append text content to the existing text
   <br>添加文本（可包含格式）
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clear()">clear</a>():void</div>
<div class="summaryTableDescription">
   clear all properties, back to original status.</div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#copyFromRichText()">copyFromRichText</a>(source:<a href="RichTextField.html">RichTextField</a>, beginIndex:int = -1, endIndex:int = -1, autoWordWrap:Boolean = true):void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getSpriteAt()">getSpriteAt</a>(depth:int):Sprite</div>
<div class="summaryTableDescription">
   获取在RichTextField中指定索引序号上的显示对象
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getSpriteByName()">getSpriteByName</a>(name:String):Sprite</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getSpriteIndexAt()">getSpriteIndexAt</a>(depth:int):int</div>
<div class="summaryTableDescription">
   获取指定深度的显示对象在RichTextField中的索引序号
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isSprite()">isSprite</a>(index:int):Boolean</div>
<div class="summaryTableDescription">
   判断在指定索引位置上是否存在一个显示对象
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeSpriteByName()">removeSpriteByName</a>(name:String):void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#replace()">replace</a>(value:String, repl:String, beginIndex:int, endIndex:int):void</div>
<div class="summaryTableDescription">
   替换文本内容，不包括显示元素。
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#resize()">resize</a>(width:Number, height:Number):void</div>
<div class="summaryTableDescription">
   重置RichTextField的大小
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setCaretIndex()">setCaretIndex</a>(caretIndex:int):void</div>
<div class="summaryTableDescription">
   use TextField.setSelection
   <br>指定鼠标指针的位置
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setTextFormat()">setTextFormat</a>(format:TextFormat, beginIndex:int = -1, endIndex:int = -1):void</div>
<div class="summaryTableDescription">
   set a textformat to _textfield, and save it.</div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#testString()">testString</a>(str:String):Boolean</div>
<div class="summaryTableDescription">
   测试是否是RichTextField的特殊字符
   </div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DYNAMIC">DYNAMIC</a> : String = "dynamic"<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#INPUT">INPUT</a> : String = "input"<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">RichTextField</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="autoScroll"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">autoScroll</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var autoScroll:Boolean</code>
</div>
<a name="autoScrollV"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">autoScrollV</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var autoScrollV:int = 0</code>
</div>
<a name="defaultTextFormat"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">defaultTextFormat</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>defaultTextFormat:TextFormat</code>&nbsp;&nbsp;[read-write]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get defaultTextFormat():TextFormat</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set defaultTextFormat(value:TextFormat):void</code>
<br>
</div>
<a name="format"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">format</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>format:Dictionary</code>&nbsp;&nbsp;[read-only]<p>
   应用于RichTextField的所有文本格式集合
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get format():Dictionary</code>
<br>
</div>
<a name="length"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">length</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>length:int</code>&nbsp;&nbsp;[read-only]<p>
   textfield的原始长度，包括显示对象
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get length():int</code>
<br>
</div>
<a name="lineHeight"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">lineHeight</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var lineHeight:Number</code>
</div>
<a name="numSprite"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">numSprite</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>numSprite:int</code>&nbsp;&nbsp;[read-only]<p>
   RichTextField中存在的所有显示对象数目。
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get numSprite():int</code>
<br>
</div>
<a name="placeholderColor"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">placeholderColor</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>placeholderColor:uint</code>&nbsp;&nbsp;[write-only]<p>
   RichTextField的特殊字符的颜色，有时候需要设置其颜色和背景色一致来让其“隐身”。
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set placeholderColor(value:uint):void</code>
<br>
</div>
<a name="spriteHspace"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">spriteHspace</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>spriteHspace:int</code>&nbsp;&nbsp;[write-only]<p>
   显示对象的水平间隔
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set spriteHspace(value:int):void</code>
<br>
</div>
<a name="spriteVspace"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">spriteVspace</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>spriteVspace:int</code>&nbsp;&nbsp;[write-only]<p>
   显示对象的垂直间隔
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set spriteVspace(value:int):void</code>
<br>
</div>
<a name="text"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">text</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>text:String</code>&nbsp;&nbsp;[read-write]<p>
   textfield中的文本内容，不包括显示对象
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get text():String</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set text(value:String):void</code>
<br>
</div>
<a name="textfield"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">textfield</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>textfield:TextField</code>&nbsp;&nbsp;[read-only]<p>
   instance of textfield
   <br>textfield实例
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get textfield():TextField</code>
<br>
</div>
<a name="textLength"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">textLength</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>textLength:int</code>&nbsp;&nbsp;[read-only]<p>
   textfield中的文本长度，不包括显示对象
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get textLength():int</code>
<br>
</div>
<a name="type"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">type</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>type:String</code>&nbsp;&nbsp;[read-write]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get type():String</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set type(value:String):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="RichTextField()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">RichTextField</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function RichTextField(width:Number, height:Number, type:String)</code><p>
   constructor
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">width</span>:Number</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">height</span>:Number</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">type</span>:String</code></td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="addSprite()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addSprite</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function addSprite(target:*, caretIndex:int = -1, width:Number = -1, height:Number = -1):void</code><p>
   add a sprite with a placeholder to the right place
   添加一个显示元素到指定的位置
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:*</code> &mdash; Class or Sprite instance
   <br>要添加的显示元素对象，可以是类或实例
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">caretIndex</span>:int</code> (default = <code>-1</code>)<code></code> &mdash; 指定要添加的显示对象的宽度
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">width</span>:Number</code> (default = <code>-1</code>)<code></code> &mdash; 指定要添加的显示对象的高度
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">height</span>:Number</code> (default = <code>-1</code>)<code></code> &mdash; 指定显示对象要添加在RichTextField中的索引位置
   </td>
</tr>
</table>
</div>
<a name="appendFromRichText()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">appendFromRichText</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function appendFromRichText(source:<a href="RichTextField.html">RichTextField</a>, beginIndex:int = -1, endIndex:int = -1, autoWordWrap:Boolean = true):void</code><p>
   append rich text with sprites in source.
   <br>追加另一个RichTextField中的富文本内容到此RichTextField中
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">source</span>:<a href="RichTextField.html">RichTextField</a></code> &mdash; 指定的RichTextField源
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">beginIndex</span>:int</code> (default = <code>-1</code>)<code></code> &mdash; 指定要追加的RichTextField源中的起始位置
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">endIndex</span>:int</code> (default = <code>-1</code>)<code></code> &mdash; 指定要追加的RichTextField源中的结束位置
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">autoWordWrap</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; 追加完内容后是否自动换行
   </td>
</tr>
</table>
</div>
<a name="appendRichText()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">appendRichText</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function appendRichText(text:String, object:Array = null, format:TextFormat = null, autoWordWrap:Boolean = true):void</code><p>
   append rich text which contains display objects and text format.
   <br>添加包含显示对象和格式的富文本
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">text</span>:String</code> &mdash; text content to append
   <br>要添加的文本
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">object</span>:Array</code> (default = <code>null</code>)<code></code> &mdash; display objects to append, each element should like this {index:1, src:object}
   <br>要添加的显示对象数组，其中每个元素的格式为：{index:1, src:object}。index代表元素在text文本中的索引位置，src为元素的对象实例。
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">format</span>:TextFormat</code> (default = <code>null</code>)<code></code> &mdash; text format to apply
   <br>要应用于添加的文本的格式
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">autoWordWrap</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; whether to wordwrap or not
   <br>是否自动换行
   </td>
</tr>
</table>
</div>
<a name="appendText()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">appendText</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function appendText(text:String, format:TextFormat = null, autoWordWrap:Boolean = true):void</code><p>
   append text content to the existing text
   <br>添加文本（可包含格式）
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">text</span>:String</code> &mdash; text content to append
   <br>要添加的文本
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">format</span>:TextFormat</code> (default = <code>null</code>)<code></code> &mdash; text format to apply
   <br>要应用于添加的文本的格式
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">autoWordWrap</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; whether to wordwrap or not
   <br>是否自动换行
   </td>
</tr>
</table>
</div>
<a name="clear()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clear</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function clear():void</code><p>
   clear all properties, back to original status.
   <br>清除所有内容，恢复到初始状态。
   </p></div>
<a name="copyFromRichText()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">copyFromRichText</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function copyFromRichText(source:<a href="RichTextField.html">RichTextField</a>, beginIndex:int = -1, endIndex:int = -1, autoWordWrap:Boolean = true):void</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">source</span>:<a href="RichTextField.html">RichTextField</a></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">beginIndex</span>:int</code> (default = <code>-1</code>)<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">endIndex</span>:int</code> (default = <code>-1</code>)<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">autoWordWrap</span>:Boolean</code> (default = <code>true</code>)<code></code></td>
</tr>
</table>
</div>
<a name="getSpriteAt()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getSpriteAt</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getSpriteAt(depth:int):Sprite</code><p>
   获取在RichTextField中指定索引序号上的显示对象
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">depth</span>:int</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Sprite</code></td>
</tr>
</table>
</div>
<a name="getSpriteByName()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getSpriteByName</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getSpriteByName(name:String):Sprite</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Sprite</code></td>
</tr>
</table>
</div>
<a name="getSpriteIndexAt()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getSpriteIndexAt</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getSpriteIndexAt(depth:int):int</code><p>
   获取指定深度的显示对象在RichTextField中的索引序号
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">depth</span>:int</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>int</code></td>
</tr>
</table>
</div>
<a name="isSprite()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isSprite</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function isSprite(index:int):Boolean</code><p>
   判断在指定索引位置上是否存在一个显示对象
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">index</span>:int</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
</div>
<a name="removeSpriteByName()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeSpriteByName</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeSpriteByName(name:String):void</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code></td>
</tr>
</table>
</div>
<a name="replace()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">replace</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function replace(value:String, repl:String, beginIndex:int, endIndex:int):void</code><p>
   替换文本内容，不包括显示元素。
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">repl</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">beginIndex</span>:int</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">endIndex</span>:int</code></td>
</tr>
</table>
</div>
<a name="resize()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">resize</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function resize(width:Number, height:Number):void</code><p>
   重置RichTextField的大小
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">width</span>:Number</code> &mdash; 要重置的宽度
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">height</span>:Number</code> &mdash; 要重置的高度
   </td>
</tr>
</table>
</div>
<a name="setCaretIndex()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setCaretIndex</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setCaretIndex(caretIndex:int):void</code><p>
   use TextField.setSelection
   <br>指定鼠标指针的位置
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">caretIndex</span>:int</code></td>
</tr>
</table>
</div>
<a name="setTextFormat()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setTextFormat</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setTextFormat(format:TextFormat, beginIndex:int = -1, endIndex:int = -1):void</code><p>
   set a textformat to _textfield, and save it.
   <br>if beginIndex=-1 and endIndex=-1, all text will be setted
   <br>if beginIndex!=-1 and endIndex=-1, only one char in beginIndex will be setted
   <br>设置文本格式，和TextField中的方法一样
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">format</span>:TextFormat</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">beginIndex</span>:int</code> (default = <code>-1</code>)<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">endIndex</span>:int</code> (default = <code>-1</code>)<code></code></td>
</tr>
</table>
</div>
<a name="testString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">testString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function testString(str:String):Boolean</code><p>
   测试是否是RichTextField的特殊字符
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">str</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code></td>
</tr>
</table>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="DYNAMIC"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">DYNAMIC</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const DYNAMIC:String = "dynamic"</code>
</div>
<a name="INPUT"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">INPUT</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const INPUT:String = "input"</code>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
